{"version":3,"file":"static/chunks/pages/category/[slug]-ba5089f9ac1b6f2f.js","mappings":"kKA4BA,UAAeA,EAAf,G,uBC3BKC,OAAOC,SAAWD,OAAOC,UAAY,IAAIC,KAAK,CAC7C,mBACA,WACE,OAAO,EAAQ,W","sources":["webpack://_N_E/./src/pages/category/[slug]/index.js","webpack://_N_E/?29a5"],"sourcesContent":["import { validIdPattern } from \"common/utils\";\n\nimport CategoryBooks from \"modules/CategoryBooks\";\nimport { prefetchCategoriesBooks } from \"modules/CategoryBooks/actions\";\n\nimport { getPage } from \"components/Pagination/utils\";\n\nexport const getServerSideProps = async ({ query, res }) => {\n res.setHeader(\"Cache-Control\", \"public, s-maxage=86400, stale-while-revalidate=59\");\n\n const { slug = \"\", page, after, before } = query;\n const [id] = slug.match(validIdPattern) || [];\n\n const pageFromUrl = getPage(page);\n\n if (!id) {\n return { notFound: true };\n }\n\n const prefetchedData = await prefetchCategoriesBooks({ id, page: pageFromUrl, after, before });\n\n if (prefetchedData.notFound) {\n return { notFound: true };\n }\n\n return prefetchedData;\n};\n\nexport default CategoryBooks;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/category/[slug]\",\n function () {\n return require(\"private-next-pages/category/[slug]/index.js\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/category/[slug]\"])\n });\n }\n "],"names":["CategoryBooks","window","__NEXT_P","push"],"sourceRoot":""}